<template>
    <div>
      Web学习（编程式导航）
      <br>
      <button @click="clickHandler">去home页</button>  <br>
      <button @click="clickShopHandler">去Shop页</button>  <br>

    </div>
</template>

<script>
    export default {
      name: "WebLearn",
      methods: {
        clickHandler() {
          this.$router.push("/home");
        },
        clickShopHandler() {
          // this.$router.push("/shop/12345qwer");
          //命名路由
          this.$router.push({name: 'Shop', params: {id: "12345qwer命名路由"}});
        }
      }
    }
</script>

<style scoped>

</style>
